package com.hellobike.haxing.modules.order.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.List;

/**
 * @Description: 订单信息
 * @Author: haxing-boot
 * @Date: 2020-02-08
 * @Version: V1.0
 */
@Data
@TableName("t_order")
public class Order implements Serializable {
    private static final long serialVersionUID = 1L;
    
	/**id*/
	@TableId(type = IdType.AUTO)
    private java.lang.Long id ;
	/**订单编号*/
	@Excel(name = "订单编号", width = 15)
        private java.lang.String billNo ;
	/**用户ID*/
	@Excel(name = "用户ID", width = 15)
    private java.lang.Long userId ;
	/**创建时间*/
	@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
        private java.util.Date createTime ;
	/**后台创建人*/
	@Excel(name = "后台创建人", width = 15)
        private java.lang.Integer createBy ;
	/**修改时间*/
	@Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
        private java.util.Date updateTime ;
	/**后台修改人*/
	@Excel(name = "后台修改人", width = 15)
        private java.lang.Integer updateBy ;
	/**提货站点*/
	@Excel(name = "提货站点", width = 15)
    private java.lang.Long shopId ;
	/**订单类型1购物车普通订单2购物车限时购订单3拼团订单*/
	@Excel(name = "订单类型1购物车订单2限时购直接下单3拼团订单", width = 15)
        private java.lang.Integer type ;
	/**订单状态1创建待支付2订单取消3支付待提货4待揽收5已取货6已完成7交易关闭10售后申请11待退回12待返仓13待退款14售后失败15售后完成16被驳回 20退款中21已退款(退款成功)22退款失败30审核中31审核不通过*/
	@Excel(name = "订单状态1创建待支付2订单取消3支付待提货4待揽收5已取货6已完成7交易关闭10售后申请11待退回12待返仓13待退款14售后失败15售后完成16被驳回 20退款中21已退款(退款成功)22退款失败30审核中31审核不通过", width = 15)
        private java.lang.Integer status ;
	/**原订单状态（取消审核用）1创建待支付2订单取消3支付待提货4待揽收5已取货6已完成7交易关闭 10售后申请11待退回12待返仓13待退款14售后失败15售后完成 20退款中21已退款(退款成功)22退款失败30审核中")*/
		private java.lang.Integer originStatus;
	/**订单取消审核状态(1审核通过2审核不通过)**/
		private java.lang.Integer approveStatus;
	/**订单取消审核人**/
		private java.lang.Integer approver;
	/**审核时间**/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
		private java.util.Date approveTime ;
	/**总金额*/
	@Excel(name = "总金额", width = 15)
        private java.math.BigDecimal totalAmount ;
	/**优惠金额*/
	@Excel(name = "优惠金额", width = 15)
        private java.math.BigDecimal couponAmount ;
	/**支付金额*/
	@Excel(name = "支付金额", width = 15)
        private java.math.BigDecimal payAmount ;
	/**支付时间*/
	@Excel(name = "支付时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
        private java.util.Date payTime ;
	/**0未删除1删除*/
	@Excel(name = "0未删除1删除", width = 15)
      @TableLogic
      private java.lang.Integer deleted ;
	/**0未同步1同步*/
	@Excel(name = "0未同步1同步", width = 15)
        private java.lang.Integer isAsync ;
	/**取消时间*/
	@Excel(name = "取消时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
        private java.util.Date cancelTime ;
	/**同步时间*/
	@Excel(name = "同步时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
        private java.util.Date syncTime ;
	/**未支付1已支付*/
	@Excel(name = "未支付1已支付", width = 15)
        private java.lang.Integer isPay ;
	/**提货码*/
	@Excel(name = "提货码", width = 15)
        private java.lang.Integer deliveryCode ;
	/**成功后可结单时间*/
	@Excel(name = "成功后可结单时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
        private java.util.Date successTime ;
	/**取货时间*/
	@Excel(name = "取货时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private java.util.Date deliveryTime ;

    @Excel(name = "交易关闭时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date payCloseTime;

    /**
     * 0未同步1同步
     */
    @Excel(name = "同步采购单0未同步1同步", width = 15)
    private java.lang.Integer isAsyncProcure;
    @Excel(name = "门店佣金结算时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private java.util.Date shopMissTime;


    //收获手机号
    @TableField(exist = false)
    private java.lang.String mphone;
    //收货人
    @TableField(exist = false)
    private java.lang.String receiver;
    //门店地址
    @TableField(exist = false)
    private java.lang.String address;
    //用户电话
    @TableField(exist = false)
    private java.lang.String mobile;
    //用户名称
    @TableField(exist = false)
    private java.lang.String nickname;

    //订单明细
    @TableField(exist = false)
    private List<OrderDetail> detailList;

    //售后信息
    @TableField(exist = false)
    private List<OrderAftersale> aftersaleList;

    //优惠券信息
    @TableField(exist = false)
    private List<OrderCoupon> couponList;

    //团长提现
    @TableField(exist = false)
    private List<OrderShop> shopList;


    private Long leaderId;


}
